package com.molin.genericityclass;

import java.util.ArrayList;

public class Demo3 {
    public static void main(String[] args) {
        ArrayList<String> list1=addEelement(new ArrayList<String>(),"a","c");
        System.out.println(list1);
    }
    public  static <T> ArrayList<T> addEelement(ArrayList<T> list,T t1,T t2){
        list.add(t1);
        list.add(t2);
        return list;
    }
}
